<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the TablePointCharged class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single TablePointCharged object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a TablePointChargedMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 * 
	 * @package My Application
	 * @subpackage MetaControls
	 * property-read TablePointCharged $TablePointCharged the actual TablePointCharged data class being edited
	 * property QLabel $IdControl
	 * property-read QLabel $IdLabel
	 * property QListBox $UserIdControl
	 * property-read QLabel $UserIdLabel
	 * property QIntegerTextBox $CurrencyControl
	 * property-read QLabel $CurrencyLabel
	 * property QIntegerTextBox $PointBalanceBeforeControl
	 * property-read QLabel $PointBalanceBeforeLabel
	 * property QIntegerTextBox $PointBalanceAfterControl
	 * property-read QLabel $PointBalanceAfterLabel
	 * property QIntegerTextBox $PointChargedControl
	 * property-read QLabel $PointChargedLabel
	 * property QDateTimePicker $ChargedDateControl
	 * property-read QLabel $ChargedDateLabel
	 * property QTextBox $DescriptionControl
	 * property-read QLabel $DescriptionLabel
	 * property QTextBox $ActiveControl
	 * property-read QLabel $ActiveLabel
	 * property QIntegerTextBox $TransactionIdControl
	 * property-read QLabel $TransactionIdLabel
	 * property QIntegerTextBox $StatusControl
	 * property-read QLabel $StatusLabel
	 * property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class TablePointChargedMetaControlGen extends QBaseClass {
		// General Variables
		protected $objTablePointCharged;
		protected $objParentObject;
		protected $strTitleVerb;
		protected $blnEditMode;

		// Controls that allow the editing of TablePointCharged's individual data fields
		protected $lblId;
		protected $lstUser;
		protected $txtCurrency;
		protected $txtPointBalanceBefore;
		protected $txtPointBalanceAfter;
		protected $txtPointCharged;
		protected $calChargedDate;
		protected $txtDescription;
		protected $txtActive;
		protected $txtTransactionId;
		protected $txtStatus;

		// Controls that allow the viewing of TablePointCharged's individual data fields
		protected $lblUserId;
		protected $lblCurrency;
		protected $lblPointBalanceBefore;
		protected $lblPointBalanceAfter;
		protected $lblPointCharged;
		protected $lblChargedDate;
		protected $lblDescription;
		protected $lblActive;
		protected $lblTransactionId;
		protected $lblStatus;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * TablePointChargedMetaControl to edit a single TablePointCharged object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single TablePointCharged object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePointChargedMetaControl
		 * @param TablePointCharged $objTablePointCharged new or existing TablePointCharged object
		 */
		 public function __construct($objParentObject, TablePointCharged $objTablePointCharged) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this TablePointChargedMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked TablePointCharged object
			$this->objTablePointCharged = $objTablePointCharged;

			// Figure out if we're Editing or Creating New
			if ($this->objTablePointCharged->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
		 * edit, or if we are also allowed to create a new one, etc.
		 * 
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePointChargedMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing TablePointCharged object creation - defaults to CreateOrEdit
 		 * @return TablePointChargedMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objTablePointCharged = TablePointCharged::Load($intId);

				// TablePointCharged was found -- return it!
				if ($objTablePointCharged)
					return new TablePointChargedMetaControl($objParentObject, $objTablePointCharged);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a TablePointCharged object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new TablePointChargedMetaControl($objParentObject, new TablePointCharged());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePointChargedMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TablePointCharged object creation - defaults to CreateOrEdit
		 * @return TablePointChargedMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return TablePointChargedMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePointChargedMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TablePointCharged object creation - defaults to CreateOrEdit
		 * @return TablePointChargedMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return TablePointChargedMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objTablePointCharged->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QListBox lstUser
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstUser_Create($strControlId = null) {
			$this->lstUser = new QListBox($this->objParentObject, $strControlId);
			$this->lstUser->Name = QApplication::Translate('User');
			$this->lstUser->Required = true;
			if (!$this->blnEditMode)
				$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
			$objUserArray = TableUserProject::LoadAll();
			if ($objUserArray) foreach ($objUserArray as $objUser) {
				$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
				if (($this->objTablePointCharged->User) && ($this->objTablePointCharged->User->Id == $objUser->Id))
					$objListItem->Selected = true;
				$this->lstUser->AddItem($objListItem);
			}
			return $this->lstUser;
		}

		/**
		 * Create and setup QLabel lblUserId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserId_Create($strControlId = null) {
			$this->lblUserId = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserId->Name = QApplication::Translate('User');
			$this->lblUserId->Text = ($this->objTablePointCharged->User) ? $this->objTablePointCharged->User->__toString() : null;
			$this->lblUserId->Required = true;
			return $this->lblUserId;
		}

		/**
		 * Create and setup QIntegerTextBox txtCurrency
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtCurrency_Create($strControlId = null) {
			$this->txtCurrency = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtCurrency->Name = QApplication::Translate('Currency');
			$this->txtCurrency->Text = $this->objTablePointCharged->Currency;
			return $this->txtCurrency;
		}

		/**
		 * Create and setup QLabel lblCurrency
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblCurrency_Create($strControlId = null, $strFormat = null) {
			$this->lblCurrency = new QLabel($this->objParentObject, $strControlId);
			$this->lblCurrency->Name = QApplication::Translate('Currency');
			$this->lblCurrency->Text = $this->objTablePointCharged->Currency;
			$this->lblCurrency->Format = $strFormat;
			return $this->lblCurrency;
		}

		/**
		 * Create and setup QIntegerTextBox txtPointBalanceBefore
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtPointBalanceBefore_Create($strControlId = null) {
			$this->txtPointBalanceBefore = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtPointBalanceBefore->Name = QApplication::Translate('Point Balance Before');
			$this->txtPointBalanceBefore->Text = $this->objTablePointCharged->PointBalanceBefore;
			$this->txtPointBalanceBefore->Required = true;
			return $this->txtPointBalanceBefore;
		}

		/**
		 * Create and setup QLabel lblPointBalanceBefore
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblPointBalanceBefore_Create($strControlId = null, $strFormat = null) {
			$this->lblPointBalanceBefore = new QLabel($this->objParentObject, $strControlId);
			$this->lblPointBalanceBefore->Name = QApplication::Translate('Point Balance Before');
			$this->lblPointBalanceBefore->Text = $this->objTablePointCharged->PointBalanceBefore;
			$this->lblPointBalanceBefore->Required = true;
			$this->lblPointBalanceBefore->Format = $strFormat;
			return $this->lblPointBalanceBefore;
		}

		/**
		 * Create and setup QIntegerTextBox txtPointBalanceAfter
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtPointBalanceAfter_Create($strControlId = null) {
			$this->txtPointBalanceAfter = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtPointBalanceAfter->Name = QApplication::Translate('Point Balance After');
			$this->txtPointBalanceAfter->Text = $this->objTablePointCharged->PointBalanceAfter;
			$this->txtPointBalanceAfter->Required = true;
			return $this->txtPointBalanceAfter;
		}

		/**
		 * Create and setup QLabel lblPointBalanceAfter
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblPointBalanceAfter_Create($strControlId = null, $strFormat = null) {
			$this->lblPointBalanceAfter = new QLabel($this->objParentObject, $strControlId);
			$this->lblPointBalanceAfter->Name = QApplication::Translate('Point Balance After');
			$this->lblPointBalanceAfter->Text = $this->objTablePointCharged->PointBalanceAfter;
			$this->lblPointBalanceAfter->Required = true;
			$this->lblPointBalanceAfter->Format = $strFormat;
			return $this->lblPointBalanceAfter;
		}

		/**
		 * Create and setup QIntegerTextBox txtPointCharged
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtPointCharged_Create($strControlId = null) {
			$this->txtPointCharged = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtPointCharged->Name = QApplication::Translate('Point Charged');
			$this->txtPointCharged->Text = $this->objTablePointCharged->PointCharged;
			$this->txtPointCharged->Required = true;
			return $this->txtPointCharged;
		}

		/**
		 * Create and setup QLabel lblPointCharged
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblPointCharged_Create($strControlId = null, $strFormat = null) {
			$this->lblPointCharged = new QLabel($this->objParentObject, $strControlId);
			$this->lblPointCharged->Name = QApplication::Translate('Point Charged');
			$this->lblPointCharged->Text = $this->objTablePointCharged->PointCharged;
			$this->lblPointCharged->Required = true;
			$this->lblPointCharged->Format = $strFormat;
			return $this->lblPointCharged;
		}

		/**
		 * Create and setup QDateTimePicker calChargedDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calChargedDate_Create($strControlId = null) {
			$this->calChargedDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calChargedDate->Name = QApplication::Translate('Charged Date');
			$this->calChargedDate->DateTime = $this->objTablePointCharged->ChargedDate;
			$this->calChargedDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calChargedDate;
		}

		/**
		 * Create and setup QLabel lblChargedDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblChargedDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblChargedDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblChargedDate->Name = QApplication::Translate('Charged Date');
			$this->strChargedDateDateTimeFormat = $strDateTimeFormat;
			$this->lblChargedDate->Text = sprintf($this->objTablePointCharged->ChargedDate) ? $this->objTablePointCharged->ChargedDate->__toString($this->strChargedDateDateTimeFormat) : null;
			return $this->lblChargedDate;
		}

		protected $strChargedDateDateTimeFormat;


		/**
		 * Create and setup QTextBox txtDescription
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtDescription_Create($strControlId = null) {
			$this->txtDescription = new QTextBox($this->objParentObject, $strControlId);
			$this->txtDescription->Name = QApplication::Translate('Description');
			$this->txtDescription->Text = $this->objTablePointCharged->Description;
			$this->txtDescription->MaxLength = TablePointCharged::DescriptionMaxLength;
			return $this->txtDescription;
		}

		/**
		 * Create and setup QLabel lblDescription
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblDescription_Create($strControlId = null) {
			$this->lblDescription = new QLabel($this->objParentObject, $strControlId);
			$this->lblDescription->Name = QApplication::Translate('Description');
			$this->lblDescription->Text = $this->objTablePointCharged->Description;
			return $this->lblDescription;
		}

		/**
		 * Create and setup QTextBox txtActive
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtActive_Create($strControlId = null) {
			$this->txtActive = new QTextBox($this->objParentObject, $strControlId);
			$this->txtActive->Name = QApplication::Translate('Active');
			$this->txtActive->Text = $this->objTablePointCharged->Active;
			$this->txtActive->Required = true;
			$this->txtActive->MaxLength = TablePointCharged::ActiveMaxLength;
			return $this->txtActive;
		}

		/**
		 * Create and setup QLabel lblActive
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblActive_Create($strControlId = null) {
			$this->lblActive = new QLabel($this->objParentObject, $strControlId);
			$this->lblActive->Name = QApplication::Translate('Active');
			$this->lblActive->Text = $this->objTablePointCharged->Active;
			$this->lblActive->Required = true;
			return $this->lblActive;
		}

		/**
		 * Create and setup QIntegerTextBox txtTransactionId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtTransactionId_Create($strControlId = null) {
			$this->txtTransactionId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtTransactionId->Name = QApplication::Translate('Transaction Id');
			$this->txtTransactionId->Text = $this->objTablePointCharged->TransactionId;
			$this->txtTransactionId->Required = true;
			return $this->txtTransactionId;
		}

		/**
		 * Create and setup QLabel lblTransactionId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblTransactionId_Create($strControlId = null, $strFormat = null) {
			$this->lblTransactionId = new QLabel($this->objParentObject, $strControlId);
			$this->lblTransactionId->Name = QApplication::Translate('Transaction Id');
			$this->lblTransactionId->Text = $this->objTablePointCharged->TransactionId;
			$this->lblTransactionId->Required = true;
			$this->lblTransactionId->Format = $strFormat;
			return $this->lblTransactionId;
		}

		/**
		 * Create and setup QIntegerTextBox txtStatus
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtStatus_Create($strControlId = null) {
			$this->txtStatus = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtStatus->Name = QApplication::Translate('Status');
			$this->txtStatus->Text = $this->objTablePointCharged->Status;
			$this->txtStatus->Required = true;
			return $this->txtStatus;
		}

		/**
		 * Create and setup QLabel lblStatus
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblStatus_Create($strControlId = null, $strFormat = null) {
			$this->lblStatus = new QLabel($this->objParentObject, $strControlId);
			$this->lblStatus->Name = QApplication::Translate('Status');
			$this->lblStatus->Text = $this->objTablePointCharged->Status;
			$this->lblStatus->Required = true;
			$this->lblStatus->Format = $strFormat;
			return $this->lblStatus;
		}



		/**
		 * Refresh this MetaControl with Data from the local TablePointCharged object.
		 * @param boolean $blnReload reload TablePointCharged from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objTablePointCharged->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objTablePointCharged->Id;

			if ($this->lstUser) {
					$this->lstUser->RemoveAllItems();
				if (!$this->blnEditMode)
					$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
				$objUserArray = TableUserProject::LoadAll();
				if ($objUserArray) foreach ($objUserArray as $objUser) {
					$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
					if (($this->objTablePointCharged->User) && ($this->objTablePointCharged->User->Id == $objUser->Id))
						$objListItem->Selected = true;
					$this->lstUser->AddItem($objListItem);
				}
			}
			if ($this->lblUserId) $this->lblUserId->Text = ($this->objTablePointCharged->User) ? $this->objTablePointCharged->User->__toString() : null;

			if ($this->txtCurrency) $this->txtCurrency->Text = $this->objTablePointCharged->Currency;
			if ($this->lblCurrency) $this->lblCurrency->Text = $this->objTablePointCharged->Currency;

			if ($this->txtPointBalanceBefore) $this->txtPointBalanceBefore->Text = $this->objTablePointCharged->PointBalanceBefore;
			if ($this->lblPointBalanceBefore) $this->lblPointBalanceBefore->Text = $this->objTablePointCharged->PointBalanceBefore;

			if ($this->txtPointBalanceAfter) $this->txtPointBalanceAfter->Text = $this->objTablePointCharged->PointBalanceAfter;
			if ($this->lblPointBalanceAfter) $this->lblPointBalanceAfter->Text = $this->objTablePointCharged->PointBalanceAfter;

			if ($this->txtPointCharged) $this->txtPointCharged->Text = $this->objTablePointCharged->PointCharged;
			if ($this->lblPointCharged) $this->lblPointCharged->Text = $this->objTablePointCharged->PointCharged;

			if ($this->calChargedDate) $this->calChargedDate->DateTime = $this->objTablePointCharged->ChargedDate;
			if ($this->lblChargedDate) $this->lblChargedDate->Text = sprintf($this->objTablePointCharged->ChargedDate) ? $this->objTablePointCharged->ChargedDate->__toString($this->strChargedDateDateTimeFormat) : null;

			if ($this->txtDescription) $this->txtDescription->Text = $this->objTablePointCharged->Description;
			if ($this->lblDescription) $this->lblDescription->Text = $this->objTablePointCharged->Description;

			if ($this->txtActive) $this->txtActive->Text = $this->objTablePointCharged->Active;
			if ($this->lblActive) $this->lblActive->Text = $this->objTablePointCharged->Active;

			if ($this->txtTransactionId) $this->txtTransactionId->Text = $this->objTablePointCharged->TransactionId;
			if ($this->lblTransactionId) $this->lblTransactionId->Text = $this->objTablePointCharged->TransactionId;

			if ($this->txtStatus) $this->txtStatus->Text = $this->objTablePointCharged->Status;
			if ($this->lblStatus) $this->lblStatus->Text = $this->objTablePointCharged->Status;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC TABLEPOINTCHARGED OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's TablePointCharged instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveTablePointCharged() {
			try {
				// Update any fields for controls that have been created
				if ($this->lstUser) $this->objTablePointCharged->UserId = $this->lstUser->SelectedValue;
				if ($this->txtCurrency) $this->objTablePointCharged->Currency = $this->txtCurrency->Text;
				if ($this->txtPointBalanceBefore) $this->objTablePointCharged->PointBalanceBefore = $this->txtPointBalanceBefore->Text;
				if ($this->txtPointBalanceAfter) $this->objTablePointCharged->PointBalanceAfter = $this->txtPointBalanceAfter->Text;
				if ($this->txtPointCharged) $this->objTablePointCharged->PointCharged = $this->txtPointCharged->Text;
				if ($this->calChargedDate) $this->objTablePointCharged->ChargedDate = $this->calChargedDate->DateTime;
				if ($this->txtDescription) $this->objTablePointCharged->Description = $this->txtDescription->Text;
				if ($this->txtActive) $this->objTablePointCharged->Active = $this->txtActive->Text;
				if ($this->txtTransactionId) $this->objTablePointCharged->TransactionId = $this->txtTransactionId->Text;
				if ($this->txtStatus) $this->objTablePointCharged->Status = $this->txtStatus->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the TablePointCharged object
				$this->objTablePointCharged->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's TablePointCharged instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteTablePointCharged() {
			$this->objTablePointCharged->Delete();
		}		



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'TablePointCharged': return $this->objTablePointCharged;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to TablePointCharged fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'UserIdControl':
					if (!$this->lstUser) return $this->lstUser_Create();
					return $this->lstUser;
				case 'UserIdLabel':
					if (!$this->lblUserId) return $this->lblUserId_Create();
					return $this->lblUserId;
				case 'CurrencyControl':
					if (!$this->txtCurrency) return $this->txtCurrency_Create();
					return $this->txtCurrency;
				case 'CurrencyLabel':
					if (!$this->lblCurrency) return $this->lblCurrency_Create();
					return $this->lblCurrency;
				case 'PointBalanceBeforeControl':
					if (!$this->txtPointBalanceBefore) return $this->txtPointBalanceBefore_Create();
					return $this->txtPointBalanceBefore;
				case 'PointBalanceBeforeLabel':
					if (!$this->lblPointBalanceBefore) return $this->lblPointBalanceBefore_Create();
					return $this->lblPointBalanceBefore;
				case 'PointBalanceAfterControl':
					if (!$this->txtPointBalanceAfter) return $this->txtPointBalanceAfter_Create();
					return $this->txtPointBalanceAfter;
				case 'PointBalanceAfterLabel':
					if (!$this->lblPointBalanceAfter) return $this->lblPointBalanceAfter_Create();
					return $this->lblPointBalanceAfter;
				case 'PointChargedControl':
					if (!$this->txtPointCharged) return $this->txtPointCharged_Create();
					return $this->txtPointCharged;
				case 'PointChargedLabel':
					if (!$this->lblPointCharged) return $this->lblPointCharged_Create();
					return $this->lblPointCharged;
				case 'ChargedDateControl':
					if (!$this->calChargedDate) return $this->calChargedDate_Create();
					return $this->calChargedDate;
				case 'ChargedDateLabel':
					if (!$this->lblChargedDate) return $this->lblChargedDate_Create();
					return $this->lblChargedDate;
				case 'DescriptionControl':
					if (!$this->txtDescription) return $this->txtDescription_Create();
					return $this->txtDescription;
				case 'DescriptionLabel':
					if (!$this->lblDescription) return $this->lblDescription_Create();
					return $this->lblDescription;
				case 'ActiveControl':
					if (!$this->txtActive) return $this->txtActive_Create();
					return $this->txtActive;
				case 'ActiveLabel':
					if (!$this->lblActive) return $this->lblActive_Create();
					return $this->lblActive;
				case 'TransactionIdControl':
					if (!$this->txtTransactionId) return $this->txtTransactionId_Create();
					return $this->txtTransactionId;
				case 'TransactionIdLabel':
					if (!$this->lblTransactionId) return $this->lblTransactionId_Create();
					return $this->lblTransactionId;
				case 'StatusControl':
					if (!$this->txtStatus) return $this->txtStatus_Create();
					return $this->txtStatus;
				case 'StatusLabel':
					if (!$this->lblStatus) return $this->lblStatus_Create();
					return $this->lblStatus;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to TablePointCharged fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'UserIdControl':
						return ($this->lstUser = QType::Cast($mixValue, 'QControl'));
					case 'CurrencyControl':
						return ($this->txtCurrency = QType::Cast($mixValue, 'QControl'));
					case 'PointBalanceBeforeControl':
						return ($this->txtPointBalanceBefore = QType::Cast($mixValue, 'QControl'));
					case 'PointBalanceAfterControl':
						return ($this->txtPointBalanceAfter = QType::Cast($mixValue, 'QControl'));
					case 'PointChargedControl':
						return ($this->txtPointCharged = QType::Cast($mixValue, 'QControl'));
					case 'ChargedDateControl':
						return ($this->calChargedDate = QType::Cast($mixValue, 'QControl'));
					case 'DescriptionControl':
						return ($this->txtDescription = QType::Cast($mixValue, 'QControl'));
					case 'ActiveControl':
						return ($this->txtActive = QType::Cast($mixValue, 'QControl'));
					case 'TransactionIdControl':
						return ($this->txtTransactionId = QType::Cast($mixValue, 'QControl'));
					case 'StatusControl':
						return ($this->txtStatus = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>